Activity Diagram for the Restaurant Management System
Create some activity diagrams for the restaurant management system problem.
We'll cover the following
Activities diagrams are a great way to visualize the flow of messages from one activity to the other in the system. There can be different activity diagrams that we can create for our restaurant management system. In this lesson, we’ll create activity diagrams for the following two activities:
Place the order
Activity challenge: How to cancel the order
Place the order#
The following are the states and actions that will be involved in this activity diagram.
States#
Initial state: A guest arrives at the restaurant and asks for a table.
Final state: The guest successfully placed a food order.
Actions#
The guest arrives at the restaurant reception and asks for a table. The receptionist checks for table availability. The guest will sit at the table if the table is available. If the table is unavailable, the guest will wait for a free table.
The waiter will appear with the menu when a guest sits at the table. The guest will decide to order from the menu. The waiter will send it to the kitchen.
Based on the order above, the activity diagram of the table booking and the food order are shown below:
Activity challenge: Cancel the order#
Let’s create an activity diagram for a guest who wants to cancel their order.
A skeleton of the activity diagram is given below.
Notice that the actions in the diagram above are numbered from 1 to 6. The slots shown below represent the activities, and the arrows represent the flow from one activity to the other. Can you rearrange the slots below in the correct order they should appear in the activity diagram above?
Note: If you unsure, click the “Show Solution” button to check the correct answer.
Alternatively, click the "Show complete diagram" button below to see the complete activity diagram.
We've looked at some of the activity diagrams of our restaurant management system. In the next lesson, we will present the code for our designed classes in some of the most popular languages.
Sequence Diagram for the Restaurant Management System
Code for the Restaurant Management System